home *** CD-ROM | disk | FTP | other *** search
- N INP.COM
- E 144 "TEMP.BAT",0
- A 100
- MOV DX,0144 ; file name
- MOV AX,3C00
- MOV CX,0
- INT 21 ; create file
- PUSH AX ; file handle in stack
- MOV CH,00
- MOV CL,[080] ; length of command string
- JCXZ 11F ; skip if no command line
- DEC CL ; drop first char (space)
- POP BX ; get file handle
- PUSH BX
- MOV AH,40
- MOV DX,082 ; command string offset
- INT 21 ; write to file
- MOV AH,0A
- MOV DX,0144
- MOV BYTE PTR [0144],50 ; max. length of 80 characters
- INT 21 ; input string
- MOV CH,00
- MOV CL,[0145] ; length of string
- POP BX ; get file handle
- PUSH BX
- MOV AH,40
- MOV DX,0146 ; input string offset
- INT 21 ; write to file
- POP BX
- MOV AH,3E
- INT 21 ; close file
- MOV AX,4C00
- INT 21 ; exit to dos
-
- R CX
- 4D
- W
- Q
-